﻿using System;
using System.Collections.Generic;
using System.Text;
using FrameworkX.ObjectSpace.Data.Schema;

namespace FrameworkX.HadithDB.Core.Entities
{
    [Serializable]
    public class Person
    {
        [PrimaryKey]
        [Int32(isPrimary: true, isNullable:false, isIdentity: true)]
        public int PersonID { get; set; }

        [AnsiString(length:40, isNullable:false)]
        public string Name { get; set; }

        [AnsiString(length: 20, isNullable: false)]
        public string ShortName { get; set; }

        [AnsiString(length: 60, isNullable: false)]
        public string FullName { get; set; }

        [String(length: 50, isNullable: false)]
        public string ArabicName { get; set; }
        
        [Int32(isNullable:false, isIdentity:false, isPrimary:false)]
        public int ParentID { get; set; }

        [ForiegnKey(typeof(ReligiousInclination))]
        [Int32(isNullable: false, isIdentity: false, isPrimary: false)]
        public int ReligiousInclinationID { get; set; }

        //[ForiegnKey(typeof(ReligiousInclination))]        
        [Int32(isNullable: false, isIdentity: false, isPrimary: false)]
        public int SecondaryReligiousInclinationID { get; set; }

    }
}
